Ext.ux.PortalToast = function() {
	var sysMsgWin;

	function insertTopElement(t, s) {
		return ['<div class="x-top-toast-wrapper ">', '<table ><tr><td class="x-top-toast-icon x-wite-space-normal" style="" >', '<div unselectable="on" class="x-top-toast-title ', t.iconCls, '">&nbsp;</div>', '</td><td style="" class="x-top-toast-content x-wite-space-normal">', '<div unselectable="on" style="" class="x-wite-space-normal x-top-toast-innercontent">', '<b>', t.time, ' </b>', s, '</div>', '</td></tr></table></div>'].join('');
	}	
	return {
	    msg: function(title, msg) {

		var bd = Ext.getCmp('logmessages').body;
		var dtMsg = new Date();
		title.time = dtMsg.format('H:i:s') ;			

		 var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1));
	
		 //var m =
		 Ext.DomHelper.overwrite(bd, {html:insertTopElement(title, s)}, true).focus().highlight();//.slideIn('t');
		 //bd.scrollChildIntoView(m);		 
		 
		 //console.log(bd.select('div:first-child'));
		 //console.log(Ext.query("#logmessages div.x-top-toast-wrapper ").remove());		 
		 // m.slideIn('t');//.pause(1).ghost("t", {remove:true});		 
	    }
	};

} ();